package com.xxlie.auth.common.exception.enums;

import com.xxlie.core.common.ExceptionEnums;

/**
 *
 * @描述: 系统内容异常信息
 * @作者: lc.
 * @创建时间: 2017/6/26 .
 * @版本号: V1.0 .
 */
public enum HandlerExceptionEnums implements ExceptionEnums {

    HANDLER_SERVER_ERROR(50000, "服务器错误"),
    HANDLER_RATELIMITER(50001, "服务器繁忙"),
    HANDLER_SERVER_DB(50002, "数据库操作失败");

    public int code;
    public String message;

    HandlerExceptionEnums(final int code, final String message) {
        this.code = code;
        this.message = message;
    }

    HandlerExceptionEnums(final String message) {
        this.message = message;
    }

    @Override
    public final int getCode() {
        return code;
    }

    @Override
    public final String getMessage() {
        return message;
    }

}
